﻿using System;
using System.Collections.Generic;
using System.Text;

namespace AJAXChatClient
{
    public class AjaxChatLang
    {
        public readonly string login = "%s logs in";

        public readonly string logout = "%s logs out.";

        public readonly string logoutTimeout = "%s session expires.";

        public readonly string logoutIP = "%s has been logged out (Invalid IP address).";

        public readonly string logoutKicked = "With great regret it has been necessary to ask %s to leave.";

        public string logoutMessage(string type)
        {
            switch (type)
            {
                case "Timeout":
                    return this.logoutTimeout;
                case "IP":
                    return this.logoutIP;
                case "Kicked":
                    return this.logoutKicked;
                case "":
                default:
                    return this.logout;
            }
        }

        public readonly string channelEnter = "%s enters channel.";

        public readonly string channelLeave = "%s leaves channel.";

        public readonly string privmsg = "(whispers)";

        public readonly string privmsgto = "(whispers to %s)";

        public readonly string invite = "%s invites you to join %s.";

        public readonly string inviteto = "Your invitation to %s to join channel %s has been sent.";

        public readonly string uninvite = "%s uninvites you from channel %s.";

        public readonly string uninviteto = "Your uninvitation to %s for channel %s has been sent.";

        public readonly string queryOpen = "Private channel opened to %s.";

        public readonly string queryClose = "Private channel to %s closed.";

        public readonly string ignoreAdded = "Added %s to the ignore list.";

        public readonly string ignoreRemoved = "Removed %s from the ignore list.";

        public readonly string ignoreList = "Ignored Users:";

        public readonly string ignoreListEmpty = "No ignored Users listed.";

        public readonly string who = "Online Users:";

        public readonly string whoChannel = "Online Users in channel %s:";

        public readonly string whoEmpty = "No online users in the given channel.";

        public readonly string list = "Available channels:";

        public readonly string bans = "Banned Users:";

        public readonly string bansEmpty = "No banned Users listed.";

        public readonly string unban = "Ban of user %s revoked.";

        public readonly string whois = "User %s - IP address:";

        public readonly string whereis = "User %s is in channel %s.";

        public readonly string roll = "%s rolls %s and gets %s.";

        public readonly string nick = "%s is now known as %s.";

        public readonly string toggleUserMenu = "Toggle user menu for %s";

        public readonly string userMenuLogout = "Logout";

        public readonly string userMenuWho = "List online users";

        public readonly string userMenuList = "List available channels";

        public readonly string userMenuAction = "Describe action";

        public readonly string userMenuRoll = "Roll dice";

        public readonly string userMenuNick = "Change username";

        public readonly string userMenuEnterPrivateRoom = "Enter private room";

        public readonly string userMenuSendPrivateMessage = "Send private message";

        public readonly string userMenuDescribe = "Send private action";

        public readonly string userMenuOpenPrivateChannel = "Open private channel";

        public readonly string userMenuClosePrivateChannel = "Close private channel";

        public readonly string userMenuInvite = "Invite";

        public readonly string userMenuUninvite = "Uninvite";

        public readonly string userMenuIgnore = "Ignore/Accept";

        public readonly string userMenuIgnoreList = "List ignored users";

        public readonly string userMenuWhereis = "Display channel";

        public readonly string userMenuKick = "Kick/Ban";

        public readonly string userMenuBans = "List banned users";

        public readonly string userMenuWhois = "Display IP";

        public readonly string unbanUser = "Revoke ban of user %s";

        public readonly string joinChannel = "Join channel %s";

        public readonly string cite = "%s said:";

        public readonly string urlDialog = "Please enter the address (URL) of the webpage:";

        public readonly string deleteMessage = "Delete this chat message";

        public readonly string deleteMessageConfirm = "Really delete the selected chat message?";

        public readonly string errorCookiesRequired = "Cookies are required for this chat.";

        public readonly string errorUserNameNotFound = "Error: User %s not found.";

        public readonly string errorMissingText = "Error: Missing message text.";

        public readonly string errorMissingUserName = "Error: Missing username.";

        public readonly string errorInvalidUserName = "Error: Invalid username.";

        public readonly string errorUserNameInUse = "Error: Username already in use.";

        public readonly string errorMissingChannelName = "Error: Missing channel name.";

        public readonly string errorInvalidChannelName = "Error: Invalid channel name: %s";

        public readonly string errorPrivateMessageNotAllowed = "Error: Private messages are not allowed.";

        public readonly string errorInviteNotAllowed = "Error: You are not allowed to invite someone to this channel.";

        public readonly string errorUninviteNotAllowed = "Error: You are not allowed to uninvite someone from this channel.";

        public readonly string errorNoOpenQuery = "Error: No private channel open.";

        public readonly string errorKickNotAllowed = "Error: You are not allowed to kick %s.";

        public readonly string errorCommandNotAllowed = "Error: Command not allowed: %s";

        public readonly string errorUnknownCommand = "Error: Unknown command: %s";

        public readonly string errorMaxMessageRate = "Error: You exceeded the maximum number of messages per minute.";

        public readonly string errorConnectionTimeout = "Error: Connection timeout. Please try again.";

        public readonly string errorConnectionFailure = "Error: Connection failed: %s";

        public readonly string errorConnectionStatus = "Error: Connection status: %s";

        public readonly string errorSoundIO = "Error: Failed to load sound file (Flash IO Error).";

        public readonly string errorSocketIO = "Error: Connection to socket server failed (Flash IO Error).";

        public readonly string errorSocketSecurity = "Error: Connection to socket server failed (Flash Security Error).";

        public readonly string errorDOMSyntax = "Error: Invalid DOM Syntax (DOM ID: %s).";

        public readonly string errorUnknown = "Error: Unknown: %s";

        public string errorMessage(string type)
        {
            switch (type)
            {
                case "CookiesRequired":
                    return this.errorCookiesRequired;
                case "UserNameNotFound":
                    return this.errorUserNameNotFound;
                case "MissingText":
                    return this.errorMissingText;
                case "MissingUserName":
                    return this.errorMissingUserName;
                case "InvalidUserName":
                    return this.errorInvalidUserName;
                case "UserNameInUse":
                    return this.errorUserNameInUse;
                case "MissingChannelName":
                    return this.errorMissingChannelName;
                case "InvalidChannelName":
                    return this.errorInvalidChannelName;
                case "PrivateMessageNotAllowed":
                    return this.errorPrivateMessageNotAllowed;
                case "InviteNotAllowed":
                    return this.errorInviteNotAllowed;
                case "UninviteNotAllowed":
                    return this.errorUninviteNotAllowed;
                case "NoOpenQuery":
                    return this.errorNoOpenQuery;
                case "KickNotAllowed":
                    return this.errorKickNotAllowed;
                case "CommandNotAllowed":
                    return this.errorCommandNotAllowed;
                case "UnknownCommand":
                    return this.errorUnknownCommand;
                case "MaxMessageRate":
                    return this.errorMaxMessageRate;
                case "ConnectionTimeout":
                    return this.errorConnectionTimeout;
                case "ConnectionFailure":
                    return this.errorConnectionFailure;
                case "ConnectionStatus":
                    return this.errorConnectionStatus;
                case "SoundIO":
                    return this.errorSoundIO;
                case "SocketIO":
                    return this.errorSocketIO;
                case "SocketSecurity":
                    return this.errorSocketSecurity;
                case "DOMSyntax":
                    return this.errorDOMSyntax;
                default:
                    return this.errorUnknown.Replace("%s", type);
            }
        }
    }
}
